#include<iostream>
#include<sys/types.h>
#include<unistd.h>


int main(){
  pid_t id = fork();
  
  if(id == 0){
    std::cout<<"this is a child process:"<<getpid()<<"its parent process:"<<getppid()<<"returnval:"<<id<<std::endl;
  }else{
    std::cout<<"this is a parend process: "<<getpid()<<"its parent process:"<<getppid()<<"returnval:"<<id<<std::endl;
  }
  return 0;
}
